Optimal. Leaf size=693 \[ \frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (a \left (3 h (d h+e g)+f g^2\right )+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}}+\frac {\sqrt {a+b x+c x^2} \left (8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (e h+3 f g)+3 b^2 \left (50 h (d h+3 e g)+129 f g^2\right )\right )-2 c h x \left (8 c^2 h \left (a h (45 e h+71 f g)+b \left (50 d h^2+80 e g h+21 f g^2\right )\right )-14 b c h^2 (46 a f h+25 b e h+39 b f g)+315 b^3 f h^3+16 c^3 g \left (3 f g^2-5 h (10 d h+3 e g)\right )\right )-210 b^2 c h^3 (14 a f h+5 b (e h+3 f g))-16 c^3 h \left (16 a h \left (5 h (d h+3 e g)+13 f g^2\right )+b g \left (5 h (54 d h+47 e g)+39 f g^2\right )\right )+945 b^4 f h^4-64 c^4 g^2 \left (3 f g^2-5 h (16 d h+3 e g)\right )\right )}{1920 c^5 h}+\frac {(g+h x)^2 \sqrt {a+b x+c x^2} \left (-2 c h (32 a f h+35 b e h+24 b f g)+63 b^2 f h^2-\left (c^2 \left (12 f g^2-20 h (4 d h+3 e g)\right )\right )\right )}{240 c^3 h}-\frac {(g+h x)^3 \sqrt {a+b x+c x^2} (9 b f h+2 c (f g-5 e h))}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 2.10, antiderivative size = 692, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1653, 832, 779, 621, 206} \[ \frac {\sqrt {a+b x+c x^2} \left (8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (e h+3 f g)+3 b^2 \left (50 h (d h+3 e g)+129 f g^2\right )\right )-2 c h x \left (8 c^2 h \left (a h (45 e h+71 f g)+10 b h (5 d h+8 e g)+21 b f g^2\right )-14 b c h^2 (46 a f h+25 b e h+39 b f g)+315 b^3 f h^3+16 c^3 \left (3 f g^3-5 g h (10 d h+3 e g)\right )\right )-210 b^2 c h^3 (14 a f h+5 b (e h+3 f g))-16 c^3 h \left (16 a h \left (5 h (d h+3 e g)+13 f g^2\right )+b g \left (5 h (54 d h+47 e g)+39 f g^2\right )\right )+945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (16 d h+3 e g)\right )\right )}{1920 c^5 h}+\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right ) \left (-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (3 a h (d h+e g)+a f g^2+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}}+\frac {(g+h x)^2 \sqrt {a+b x+c x^2} \left (-2 c h (32 a f h+35 b e h+24 b f g)+63 b^2 f h^2+c^2 \left (-\left (12 f g^2-20 h (4 d h+3 e g)\right )\right )\right )}{240 c^3 h}-\frac {(g+h x)^3 \sqrt {a+b x+c x^2} (9 b f h+2 c (f g-5 e h))}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 621
Rule 779
Rule 832
Rule 1653
Rubi steps
\begin {align*} \int \frac {(g+h x)^3 \left (d+e x+f x^2\right )}{\sqrt {a+b x+c x^2}} \, dx &=\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\int \frac {(g+h x)^3 \left (-\frac {1}{2} h (b f g-10 c d h+8 a f h)-\frac {1}{2} h (2 c f g-10 c e h+9 b f h) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{5 c h^2}\\ &=-\frac {(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt {a+b x+c x^2}}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\int \frac {(g+h x)^2 \left (\frac {1}{4} h \left (9 b^2 f g h+54 a b f h^2-2 b c g (3 f g+5 e h)+4 c h (20 c d g-13 a f g-15 a e h)\right )+\frac {1}{4} h \left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{20 c^2 h^2}\\ &=\frac {\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt {a+b x+c x^2}}{240 c^3 h}-\frac {(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt {a+b x+c x^2}}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\int \frac {(g+h x) \left (-\frac {1}{8} h \left (63 b^3 f g h^2+4 b c \left (6 c f g^3+10 c g h (3 e g+2 d h)-5 a h^2 (29 f g+14 e h)\right )+2 b^2 \left (126 a f h^3-c g h (51 f g+35 e h)\right )-8 c h \left (60 c^2 d g^2+32 a^2 f h^2-a c \left (33 f g^2+75 e g h+40 d h^2\right )\right )\right )-\frac {1}{8} h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right )}{\sqrt {a+b x+c x^2}} \, dx}{60 c^3 h^2}\\ &=\frac {\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt {a+b x+c x^2}}{240 c^3 h}-\frac {(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt {a+b x+c x^2}}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5 h}+\frac {\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{256 c^5}\\ &=\frac {\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt {a+b x+c x^2}}{240 c^3 h}-\frac {(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt {a+b x+c x^2}}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5 h}+\frac {\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \operatorname {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{128 c^5}\\ &=\frac {\left (63 b^2 f h^2-2 c h (24 b f g+35 b e h+32 a f h)-c^2 \left (12 f g^2-20 h (3 e g+4 d h)\right )\right ) (g+h x)^2 \sqrt {a+b x+c x^2}}{240 c^3 h}-\frac {(9 b f h+2 c (f g-5 e h)) (g+h x)^3 \sqrt {a+b x+c x^2}}{40 c^2 h}+\frac {f (g+h x)^4 \sqrt {a+b x+c x^2}}{5 c h}+\frac {\left (945 b^4 f h^4-64 c^4 \left (3 f g^4-5 g^2 h (3 e g+16 d h)\right )-210 b^2 c h^3 (14 a f h+5 b (3 f g+e h))+8 c^2 h^2 \left (128 a^2 f h^2+275 a b h (3 f g+e h)+3 b^2 \left (129 f g^2+50 h (3 e g+d h)\right )\right )-16 c^3 h \left (16 a h \left (13 f g^2+5 h (3 e g+d h)\right )+b g \left (39 f g^2+5 h (47 e g+54 d h)\right )\right )-2 c h \left (315 b^3 f h^3-14 b c h^2 (39 b f g+25 b e h+46 a f h)+16 c^3 \left (3 f g^3-5 g h (3 e g+10 d h)\right )+8 c^2 h \left (21 b f g^2+10 b h (8 e g+5 d h)+a h (71 f g+45 e h)\right )\right ) x\right ) \sqrt {a+b x+c x^2}}{1920 c^5 h}+\frac {\left (256 c^5 d g^3-63 b^5 f h^3+70 b^3 c h^2 (3 b f g+b e h+4 a f h)-128 c^4 g \left (a f g^2+3 a h (e g+d h)+b g (e g+3 d h)\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (3 f g+e h)+b^2 \left (3 f g^2+3 e g h+d h^2\right )\right )+96 c^3 \left (a^2 h^2 (3 f g+e h)+b^2 g \left (f g^2+3 h (e g+d h)\right )+2 a b h \left (3 f g^2+h (3 e g+d h)\right )\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{256 c^{11/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.25, size = 588, normalized size = 0.85 \[ \frac {\sqrt {a+x (b+c x)} \left (4 c^2 h \left (256 a^2 f h^2+2 a b h (275 e h+825 f g+161 f h x)+b^2 \left (25 h (12 d h+36 e g+7 e h x)+3 f \left (300 g^2+175 g h x+42 h^2 x^2\right )\right )\right )-210 b^2 c h^2 (14 a f h+5 b e h+3 b f (5 g+h x))-16 c^3 \left (a h \left (5 h (16 d h+48 e g+9 e h x)+f \left (240 g^2+135 g h x+32 h^2 x^2\right )\right )+b \left (5 h \left (2 d h (27 g+5 h x)+e \left (54 g^2+30 g h x+7 h^2 x^2\right )\right )+3 f \left (30 g^3+50 g^2 h x+35 g h^2 x^2+9 h^3 x^3\right )\right )\right )+945 b^4 f h^3+32 c^4 \left (10 d h \left (18 g^2+9 g h x+2 h^2 x^2\right )+15 e \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )+3 f x \left (10 g^3+20 g^2 h x+15 g h^2 x^2+4 h^3 x^3\right )\right )\right )}{1920 c^5}+\frac {\tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+x (b+c x)}}\right ) \left (96 c^3 \left (a^2 h^2 (e h+3 f g)+2 a b h \left (h (d h+3 e g)+3 f g^2\right )+b^2 g \left (3 h (d h+e g)+f g^2\right )\right )-80 b c^2 h \left (3 a^2 f h^2+3 a b h (e h+3 f g)+b^2 \left (d h^2+3 e g h+3 f g^2\right )\right )+70 b^3 c h^2 (4 a f h+b e h+3 b f g)-128 c^4 g \left (3 a h (d h+e g)+a f g^2+b g (3 d h+e g)\right )-63 b^5 f h^3+256 c^5 d g^3\right )}{256 c^{11/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.73, size = 1435, normalized size = 2.07 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 822, normalized size = 1.19 \[ \frac {1}{1920} \, \sqrt {c x^{2} + b x + a} {\left (2 \, {\left (4 \, {\left (6 \, {\left (\frac {8 \, f h^{3} x}{c} + \frac {30 \, c^{4} f g h^{2} - 9 \, b c^{3} f h^{3} + 10 \, c^{4} h^{3} e}{c^{5}}\right )} x + \frac {240 \, c^{4} f g^{2} h - 210 \, b c^{3} f g h^{2} + 80 \, c^{4} d h^{3} + 63 \, b^{2} c^{2} f h^{3} - 64 \, a c^{3} f h^{3} + 240 \, c^{4} g h^{2} e - 70 \, b c^{3} h^{3} e}{c^{5}}\right )} x + \frac {480 \, c^{4} f g^{3} - 1200 \, b c^{3} f g^{2} h + 1440 \, c^{4} d g h^{2} + 1050 \, b^{2} c^{2} f g h^{2} - 1080 \, a c^{3} f g h^{2} - 400 \, b c^{3} d h^{3} - 315 \, b^{3} c f h^{3} + 644 \, a b c^{2} f h^{3} + 1440 \, c^{4} g^{2} h e - 1200 \, b c^{3} g h^{2} e + 350 \, b^{2} c^{2} h^{3} e - 360 \, a c^{3} h^{3} e}{c^{5}}\right )} x - \frac {1440 \, b c^{3} f g^{3} - 5760 \, c^{4} d g^{2} h - 3600 \, b^{2} c^{2} f g^{2} h + 3840 \, a c^{3} f g^{2} h + 4320 \, b c^{3} d g h^{2} + 3150 \, b^{3} c f g h^{2} - 6600 \, a b c^{2} f g h^{2} - 1200 \, b^{2} c^{2} d h^{3} + 1280 \, a c^{3} d h^{3} - 945 \, b^{4} f h^{3} + 2940 \, a b^{2} c f h^{3} - 1024 \, a^{2} c^{2} f h^{3} - 1920 \, c^{4} g^{3} e + 4320 \, b c^{3} g^{2} h e - 3600 \, b^{2} c^{2} g h^{2} e + 3840 \, a c^{3} g h^{2} e + 1050 \, b^{3} c h^{3} e - 2200 \, a b c^{2} h^{3} e}{c^{5}}\right )} - \frac {{\left (256 \, c^{5} d g^{3} + 96 \, b^{2} c^{3} f g^{3} - 128 \, a c^{4} f g^{3} - 384 \, b c^{4} d g^{2} h - 240 \, b^{3} c^{2} f g^{2} h + 576 \, a b c^{3} f g^{2} h + 288 \, b^{2} c^{3} d g h^{2} - 384 \, a c^{4} d g h^{2} + 210 \, b^{4} c f g h^{2} - 720 \, a b^{2} c^{2} f g h^{2} + 288 \, a^{2} c^{3} f g h^{2} - 80 \, b^{3} c^{2} d h^{3} + 192 \, a b c^{3} d h^{3} - 63 \, b^{5} f h^{3} + 280 \, a b^{3} c f h^{3} - 240 \, a^{2} b c^{2} f h^{3} - 128 \, b c^{4} g^{3} e + 288 \, b^{2} c^{3} g^{2} h e - 384 \, a c^{4} g^{2} h e - 240 \, b^{3} c^{2} g h^{2} e + 576 \, a b c^{3} g h^{2} e + 70 \, b^{4} c h^{3} e - 240 \, a b^{2} c^{2} h^{3} e + 96 \, a^{2} c^{3} h^{3} e\right )} \log \left ({\left | -2 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} \sqrt {c} - b \right |}\right )}{256 \, c^{\frac {11}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 1869, normalized size = 2.70 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (g+h\,x\right )}^3\,\left (f\,x^2+e\,x+d\right )}{\sqrt {c\,x^2+b\,x+a}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (g + h x\right )^{3} \left (d + e x + f x^{2}\right )}{\sqrt {a + b x + c x^{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________